package com.example.demo2.test.controller;

import com.example.demo2.test.service.BinanceService;
import com.example.demo2.test.service.CoinbaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author ChenXi
 * @Date 2023/03/27/15:35
 */

@RestController
@Slf4j
public class CoinController {

    @Autowired
    private CoinbaseService coinbaseService;


    @RequestMapping("/coin")
    public String coinTest(){
        coinbaseService.coninbaseMarket();
        return "coin controller 申请链接了";
    }

    @RequestMapping("/coin/SUBSCRIBE")
    public String SUBSCRIBE(){
        coinbaseService.SUBSCRIBE();
        return "coin controller 申请订阅了了";
    }

    @RequestMapping("/coin/LIST_SUBSCRIPTIONS")
    public String LIST_SUBSCRIPTIONS(){
        coinbaseService.LIST_SUBSCRIPTIONS();
        return "coin controller 订阅信息流";
    }
}
